<div class="admin">
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>商品销售排行</strong></div>
        <div class="padding border-bottom">
            <a href="{:U('Statistics/users',array('type'=>'sale'))}" <if condition="$order eq 'sale'"> class="button button-small bg-green"<else /> class="button button-small border-green"</if>>按购买单量</a>
            <a href="{:U('Statistics/users',array('type'=>'points'))}" <if condition="$order eq 'points'"> class="button button-small bg-green"<else /> class="button button-small border-green"</if>>按消费金额</a>
            <a href="{:U('Statistics/users',array('type'=>'nums'))}" <if condition="$order eq 'nums'"> class="button button-small bg-green"<else /> class="button button-small border-green"</if>>按登陆次数</a>
        </div>
        <table class="table tb-type2">
            <thead>
                <tr class="thead">
                    <th width="5%">排名</th>
                    <th>头像</th>
                    <th>姓名</th>
                    <th class="align-center">单量</th>
                    <th class="align-center">消费</th>
                    <th class="align-center">登陆次数</th>
                    <th width="12%" class="align-center">注册时间</th>
                    <th width="10%">操作</th>
                </tr>
            </thead>
            <tbody>
            <foreach item="v" name="goods" key='k'>
                <tr class="hover" style="background: rgb(255, 255, 255);">
                    <td><p class="button bg-dot">{$k+1+$p*10}</p></td>
                    <td><img src="{$v['user_avatar']}" height="40" width="40" /></td>
                    <td>{$v['user_name']}</td>
                    <td class="w150 align-center">{$v['user_orders']}</td>
                    <td class="w150 align-center">{$v['user_points']}</td>
                    <td class="w150 align-center">{$v['user_login_num']}</td>
                    <td class="align-center">{$v['user_time']|date='Y-m-d H:i:s',###}</td>
                    <td class="align-center">
                        <a class="button bg-blue button-little js-del" href="{:U('deleteuser',array('user_id'=>$v['user_id']))}"><i class="icon-minus-circle"></i>发放奖励</a>
                        <a class="button bg-green button-little" href="{:U('User/details',array('user_id'=>$v['user_id']))}" target="_blank" title="预览"><i class="icon-eye"></i>查看详情</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
            <tfoot>
                <tr class="tfoot">
                    <td colspan="5">
                        <div class="pagination"><div class="pages clearfix">{$pages}</div></div>
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
</div>
<script type="text/javascript">
    $('#myform').layer({
        actionUrl: "batchAction",
        deleteUrl: "del",
    });
</script>